package com.ruoyi.labdata.service.impl;

import com.ruoyi.labdata.domain.LabDeclarationFiling;
import com.ruoyi.labdata.service.EndTaskListener;
import com.ruoyi.labdata.service.ILabDeclarationFilingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LabDeclarationFilingEndTaskListener extends EndTaskListener<LabDeclarationFiling> {
    @Autowired
    private ILabDeclarationFilingService labDeclarationFilingService;

    @Override
    public int doTask(Long instanceId) {
        LabDeclarationFiling labDeclarationFiling = labDeclarationFilingService.selectLabDeclarationFilingById(instanceId);
        labDeclarationFiling.setStatus("1");
        return labDeclarationFilingService.updateLabDeclarationFilingStatus(labDeclarationFiling);
    }
}